<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>vec_to_mat</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
HREF="refmanual.html"><LINK
REL="PREVIOUS"
TITLE="ivec_imat_mul"
HREF="man.ivec-imat-mul.html"><LINK
REL="NEXT"
TITLE="ivec_to_imat"
HREF="man.ivec-to-imat.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man.ivec-imat-mul.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man.ivec-to-imat.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="MAN.VEC-TO-MAT"
></A
>vec_to_mat</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN9417"
></A
><H2
>Name</H2
>vec_to_mat&nbsp;--&nbsp;convert a vector into a matrix</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN9420"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN9421"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;it/mat.h&gt;
      </PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>mat vec_to_mat</CODE
>( vec v, size_t width
        );</CODE
></P
><P
></P
></DIV
></DIV
><H2
>DESCRIPTION</H2
><P
> The function <CODE
CLASS="FUNCTION"
>vec_to_mat</CODE
> constructs a matrix from a vector <CODE
CLASS="PARAMETER"
>v</CODE
>. The <CODE
CLASS="PARAMETER"
>width</CODE
> first elements of the vector form the first row, the <CODE
CLASS="PARAMETER"
>width</CODE
> next the second  row, and so on. Note that the length of the vector <CODE
CLASS="PARAMETER"
>v</CODE
> should be a multiple of <CODE
CLASS="PARAMETER"
>width</CODE
>.  </P
><H2
>RETURN VALUE</H2
><P
>    The matrix
   </P
><H2
>EXAMPLE</H2
><PRE
CLASS="PROGRAMLISTING"
>&#13;#include &lt;mat.h&gt;

...

vec v = vec_new_arithm (1, 2, 12); /* v = [1 3 5 7 9 11 13 15 17 19 21 23] */
  
mat m = vec_to_mat (v, 4);        /* m = [[ 1  3  5  7]
                                          [ 9 11 13 15]
                                          [17 19 21 23]  */&#13;</PRE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man.ivec-imat-mul.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man.ivec-to-imat.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>ivec_imat_mul</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="refmanual.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ivec_to_imat</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>